﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SimpleData.ObjectModel
{
	public class DocumentManager
	{

		public DocumentManager( ISchemaLoader schemas )
		{
			this.Schemas = schemas;
		}

		public ISchemaLoader Schemas
		{ get; set; }

		public Document Create( DataObjectName name )
		{
			return new Document( DocumentToken.NewToken(), this.Schemas.GetSchemaByName( name ) );
		}
	}


	public interface ISchemaLoader
	{
		DocumentSchema GetSchemaByName( DataObjectName qualifiedName );
	}

}
